using System;
using Game.Network;

namespace Game.Network {
    public delegate void OnPacketReceive (PacketReader reader);

    public class PacketHandler {
        private int m_packetId;
        private int m_length;
        private OnPacketReceive m_onReceive;

        public PacketHandler (int packetId, int length, OnPacketReceive onReceive) {
            m_packetId = packetId;
            m_length = length;
            m_onReceive = onReceive;
        }

        public int PacketID{ get { return m_packetId; } }

        public int Length{ get { return m_length; } }

        public OnPacketReceive OnReceive{ get { return m_onReceive; } }
    }
}

